package jbase.project.system.core.defaults;

import jbase.project.system.core.common.EventHook;
import jbase.project.system.core.common.HookEventConstants;

public class DefaultEventHook implements EventHook, HookEventConstants {

	@Override
	public <T, R> R event(String event, T... objects) {
		switch (event) {
		case HOOK_EVENT_CREATE:
			System.out.println("对象被创建：" + objects[0]);
			break;
		case HOOK_EVENT_ERROR:
			System.out.println("发生了错误！");
			break;
		case HOOK_EVENT_EXCEPTION:
			System.out.println("发生异常！");
			break;
		case HOOK_EVENT_EXIT:
			System.out.println("退出事件！");
			break;
		case HOOK_EVENT_OUT:
			System.out.println(objects[0]);
			break;
		case HOOK_EVENT_START:
			System.out.println("启动事件！");
			break;
		}
		return (R) (Object) null;
	}

}
